import datetime

from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import ForeignKey
from sqlalchemy import String, Integer
from sqlalchemy import func

from database import db
from ..models.offer import Offer

class Inventory(db.Model):
    id = Column(Integer, primary_key=True)
    status = Column(String(10))
    created_at = Column(DateTime, default=func.now())
    update_at = Column(DateTime, default=func.now())
    offer_id = Column(ForeignKey(Offer.id))


class Ticket(db.Model):
    id = Column(Integer, primary_key=True)
    status = Column(String(10))
    created_at = Column(DateTime, default=func.now())
    update_at = Column(DateTime, default=func.now())
    offer_id = Column(ForeignKey(Offer.id))
    value = Column(String(200))
    key = Column(String(200))
